1. Field of the Invention
The present invention is related to a device which compresses still image data in accordance with a JPEG (Joint Photographic Expert Group) algorithm and records the compressed image data in a recording medium and, also, to a device which reads the compressed image data from the recording medium and expands the compressed image data to reproduce the still image.
2. Description of the Related Art
Image data contains a large amount of information. Accordingly, if the image data is directly processed, a large capacity memory and protracted data transfer time is required. Thus, conventionally, the image data is, first, decoded, so that the image data can be compressed, and is then processed.
A standard algorithm, for the encoding of high resolution images and the transfer of that information through telecommunication transmission channels, has been recommended by the JPEG. In order to enable a large-scale data compression, the baseline process of the JPEG algorithm breaks down the original image data into components on a spatial frequency axis using a two-dimensional discrete cosine transformation (two-dimensional DCT) process. Thereafter, the data expressed on the spatial frequency axis is quantized by using a quantization table. The quantized data is then encoded using a Huffman table.
By performing such a data compression, part of the information of the original image is lost. Namely, the image quality of the reproduced image may be deteriorated in comparison with the original image. If the value of each of the quantization coefficients included in the quantization table is set to have a smaller value, the values of the quantized DCT coefficients become large. This improves the quality of the reproduced image, but the amount of the compressed data is increased. Conversely, it is possible that, by estimating the quality of the reproduced image, the values of the quantization coefficients can be altered so as to obtain a sufficiently high quality image. The data compression is then performed again, but such an operation needs a lengthy time to process the image data, and thus, the operation efficiency is low.
Japanese Unexamined Patent Publication No. 7-135568 (corresponding to U.S. Ser. No. 08/337,409) discloses an image compression device, in which second quantization coefficients are obtained in such a manner that a quantization error, i.e., a difference between a DCT coefficient and a corresponding dequantized DCT coefficient, becomes a minimum. Thus, an optimum quantization table composed entirely of second quantization coefficients is generated, which is then recorded in a recording medium together with the compressed image data.
However, the optimum quantization table, by using minimum value quantization errors which relate to one image as a whole, is not necessarily the optimum regarding each block of pixels which, together, form the one image, even though the quantization error has a minimum value with respect to the one image as a whole. Therefore, in the expansion process using the optimum quantization table, the improvement of the quality of the reproduced image is limited to some extent. Therefore, it is desired that the image quality is further improved.